package conexao;

import java.sql.Connection;
import java.sql.SQLException;

import javax.sql.DataSource;

import oracle.jdbc.pool.OracleConnectionPoolDataSource;

public class ConnectionPool {
	
	private DataSource dataSource;

	public ConnectionPool() throws SQLException {	
	    OracleConnectionPoolDataSource pool = new OracleConnectionPoolDataSource();  //JDBCPool pool = new JDBCPool();
		pool.setURL     ("jdbc:oracle:thin:@laserdata.dyndns.info:1521:xe");
		pool.setUser    ("ARESLASERDATA");
		pool.setPassword("G2051" );
		this.dataSource = pool;
	}
	
	public Connection getConnection() throws SQLException{
		Connection connection = dataSource.getConnection();
	    return connection;  
	}	

}
